import { ElIcon } from "element-plus";
import MDI from '@iconify-json/mdi/icons.json'
import F7 from '@iconify-json/f7/icons.json'
import { Icon, addCollection } from '@iconify/vue'

addCollection(MDI)
addCollection(F7)

export function renderIcon(icon: string) {
  return () => h(ElIcon, { size: 20 },{
                  default: () => h(Icon, { icon: icon })
                })
}

export {
  Icon
}
